package com.aplink.generic.constant;

public enum ColumnType {
    Text( "text" ),
    Integer( "integer" ),
    Money( "money" ),
    Decimal( "decimal" ),
    DateTime( "datetime" ),
    Image( "image" ),
    Drawable( "drawable" );

    private String mType;

    private ColumnType( String type ) {
        setType( type );
    }

    public String getType() {
        return mType;
    }

    public void setType( String type ) {
        mType = type;
    }

    public static ColumnType get( String value ) {
        for ( ColumnType type : values() ) {
            if ( type.mType.equals( value ) ) {
                return type;
            }
        }
        return Text;
    }
}
